package slices
{
	import com.greensock.TweenLite;
	
	
	public class TweenSlice extends TimeSlice
	{
		private var _target:Object;
		private var _duration:Number;
		private var _vars:Object;
		
		public function TweenSlice(target:Object, duration:Number, vars:Object)
		{
			super();
			_target = target;
			_duration = duration;
			_vars = vars;
		}
		
		override public function onStart():void {
			_vars.onComplete = onTweenComplete;
			TweenLite.to(_target, _duration, _vars);			
		}
		
		public function onTweenComplete():void {
			isDone = true;
		}
		
	}
}